﻿using AutoMapper;
using ProgrammingEducationSystem.Dto;
using ProgrammingEducationSystem.Models;

namespace ProgrammingEducationSystem.Profiles
{
    public class ClassesProfile : Profile
    {
        public ClassesProfile()
        {
            CreateMap<ClassForCreateDto, Class>().ForMember(
                desc=>desc.Id,
                src=>src.MapFrom(
                    c=>Guid.NewGuid()
                    )
                );
            CreateMap<ClassForUpdateDto, Class>();
        }
    }
}
